/**
 * PersonAction.java	  V1.0   Feb 20, 2012 11:39:45 AM
 *
 * Copyright 2011 AsiaInfo Linkage, All rights reserved.
 *
 * Modification history(By    Time    Reason):
 * 
 * Description:
 */

package psn.action.person;

import com.ai.appframe2.service.ServiceFactory;

import psn.service.person.interfaces.IQueryMappTestDataSV;
import psn.usermodel.PersonSearchModel;
import xframe.core.action.BaseCoreAction;


/**
 * 功能描述：
 *
 * @author  余根宁
 *
 * <p>修改历史：(修改人，修改时间，修改原因/内容)</p>
 */
public class PersonAction extends BaseCoreAction {

    /**
     * serialVersionUID
     */
    private static final long serialVersionUID = -2374135396477566538L;
    
    /**
     * 人员信息查询
     */
    private PersonSearchModel searchModel;
    
    /**
     * 数据查询
     */
    private IQueryMappTestDataSV queryDataSv = (IQueryMappTestDataSV)ServiceFactory.getService(IQueryMappTestDataSV.class);

    
    /**
     * @return the searchModel
     */
    public PersonSearchModel getSearchModel() {
    
        return searchModel;
    }

    
    /**
     * @param searchModel the searchModel to set
     */
    public void setSearchModel(PersonSearchModel searchModel) {
    
        this.searchModel = searchModel;
    }
    
    /**
     * 
     * 功能描述：查询人员信息
     *
     * @author  余根宁
     * <p>创建日期 ：Feb 20, 2012 11:40:52 AM</p>
     *
     * @return
     *
     * <p>修改历史 ：(修改人，修改时间，修改原因/内容)</p>
     */
    public String queryPersonList(){
        try{
            this.setSearchResultModel(this.queryDataSv.queryDataBySearchModel(this.getSearchModel()));
            return "PersonSearch";
        } catch(Exception err){
            err.printStackTrace();
            return "Error";
        }
        
    }
    
}
